// run this on SCDB_2009_02_justiceCentered_Citation.xlsx.zip

replace majority = 100*(majority - 1)

replace justicename = "Alito" if justicename == "SAAlito"
replace justicename = "Black" if justicename == "HLBlack"
replace justicename = "Blackmun" if justicename == "HABlackmun"
replace justicename = "Brennan" if justicename == "WJBrennan"
replace justicename = "Breyer" if justicename == "SGBreyer"
replace justicename = "Burger" if justicename == "WEBurger"
replace justicename = "Burton" if justicename == "HHBurton"
replace justicename = "Clark" if justicename == "TCClark"
replace justicename = "Douglas" if justicename == "WODouglas"
replace justicename = "Fortas" if justicename == "AFortas"
replace justicename = "Frankfurter" if justicename == "FFrankfurter"
replace justicename = "Ginsburg" if justicename == "RBGinsburg"
replace justicename = "Goldberg" if justicename == "AJGoldberg"
replace justicename = "Harlan" if justicename == "JHarlan2"
replace justicename = "Jackson" if justicename == "RHJackson"
replace justicename = "Kennedy" if justicename == "AMKennedy"
replace justicename = "Marshall" if justicename == "TMarshall"
replace justicename = "Minton" if justicename == "SMinton"
replace justicename = "OConnor" if justicename == "SDOConnor"
replace justicename = "Powell" if justicename == "LFPowell"
replace justicename = "Reed" if justicename == "SFReed"
replace justicename = "Rehnquist" if justicename == "WHRehnquist"
replace justicename = "Roberts" if justicename == "JGRoberts"
replace justicename = "Scalia" if justicename == "AScalia"
replace justicename = "Sotomayor" if justicename == "SSotomayor"
replace justicename = "Souter" if justicename == "DHSouter"
replace justicename = "Stevens" if justicename == "JPStevens"
replace justicename = "Stewart" if justicename == "PStewart"
replace justicename = "Thomas" if justicename == "CThomas"
replace justicename = "Vinson" if justicename == "FMVinson"
replace justicename = "Warren" if justicename == "EWarren"
replace justicename = "White" if justicename == "BRWhite"
replace justicename = "Whittaker" if justicename == "CEWhittaker"


tabstat majority if term == 1949, by(justicename) stats(n, sum, mean) f(%9.0f)

tabstat majority if term == 1950, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 1951, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 1952, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 1953, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 1954, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 1955, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 1956, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 1957, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 1958, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 1959, by(justicename) stats(n, sum, mean) f(%9.0f)

tabstat majority if term == 1960, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 1961, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 1962, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 1963, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 1964, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 1965, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 1966, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 1967, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 1968, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 1969, by(justicename) stats(n, sum, mean) f(%9.0f)

tabstat majority if term == 1970, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 1971, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 1972, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 1973, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 1974, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 1975, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 1976, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 1977, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 1978, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 1979, by(justicename) stats(n, sum, mean) f(%9.0f)

tabstat majority if term == 1980, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 1981, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 1982, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 1983, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 1984, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 1985, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 1986, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 1987, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 1988, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 1989, by(justicename) stats(n, sum, mean) f(%9.0f)

tabstat majority if term == 1990, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 1991, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 1992, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 1993, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 1994, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 1995, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 1996, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 1997, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 1998, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 1999, by(justicename) stats(n, sum, mean) f(%9.0f)

tabstat majority if term == 2000, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 2001, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 2002, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 2003, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 2004, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 2005, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 2006, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 2007, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 2008, by(justicename) stats(n, sum, mean) f(%9.0f)

tabstat majority if term == 2009, by(justicename) stats(n, sum, mean) f(%9.0f)
tabstat majority if term == 2010, by(justicename) stats(n, sum, mean) f(%9.0f)

